package br.com.boardnaveia.dao.impl;



import javax.jdo.Query;

import br.com.boardnaveia.dao.INoticiaDAO;
import br.com.boardnaveia.dao.bean.Noticia;
import br.com.zeroutrocou.dao.jdo.BaseDAO;

class NoticiaDAOImpl extends BaseDAO<Noticia> implements INoticiaDAO{

	@Override
	public Noticia pesquisarIndice(Integer indice) {
		
		Query query = getPersistenceManager().newQuery(Noticia.class);
		
		query.setRange(indice, indice+1);
		
		query.setUnique(true);
		
		return (Noticia) query.execute();
	}

}
